package com.ynny.demo;

public class FruitTest {
    public static void main(String[] args) {
        Fruit fruit = new Fruit();
        apple apple = new apple();
        banana banana = new banana();
        pineapple pineapple = new pineapple();

        apple.setName("苹果");
        apple.setArea("昭通");
        apple.setPrice(5);

        banana.setName("香蕉");
        banana.setArea("三亚");
        banana.setPrice(10);

        pineapple.setName("菠萝");
        pineapple.setArea("三亚");
        pineapple.setPrice(15);


        System.out.println(apple);
        System.out.println(banana);
        System.out.println(pineapple);

    }

}
